module.exports = {
  base: '/doc-guidelines/',//github部署路径，本地开发和打包可移除
  title: '前端代码规范',
  // description: 'vue 基础框架说明文档',
  locales: {
    '/': {
      lang: 'zh-CN'
    }
  },
  head: [
    ['link', { rel: 'icon', href: '/logo.ico' }]
  ],
  themeConfig: {
    nav: [
      { text: '首页', link: '/' },
      { text: 'HTML规范', link: '/html/' },
      { text: 'CSS规范', link: '/css/' },
      { text: 'JS规范', link: '/js/' },
      { text: '图片规范', link: '/img/' },
      { text: '命名规范', link: '/name/' },
      { text: 'vue规范', link: '/vue/' },
      { text: '关于我们', link: '/about/' },
    ],
    //sidebar: 'auto',
    sidebar: {
      '/html/': getHtmlSidebar(),
      '/css/': getCssSidebar(),
      '/js/': getJsSidebar(),
      '/img/': getImgSidebar(),
      '/name/': getNameSidebar(),
      '/vue/': getVueSidebar(),
      '/about/': getAboutSidebar(),
    }

  },


}

function getHtmlSidebar() {
  return [
    {
      title: 'HTML规范',
      collapsable: false,
      children: [
        '',
        'style',
        'annotation',
        'template',
        'meta',
      ]
    }
  ]
}

function getCssSidebar() {
  return [
    {
      title: 'css规范',
      collapsable: false,
      children: [
        '',
        'style',
        'sass',
      ]
    }
  ]
}

function getJsSidebar() {
  return [
    {
      title: 'JS规范',
      collapsable: false,
      children: [
        '',
      ]
    }
  ]
}

function getImgSidebar() {
  return [
    {
      title: '图片规范',
      collapsable: false,
      children: [
        '',
        'use'
      ]
    }
  ]
}

function getNameSidebar() {
  return [
    {
      title: '命名规范',
      collapsable: false,
      children: [
        '',
        'class',
      ]
    }
  ]
}

function getVueSidebar() {
  return [
    {
      title: 'Vue规范',
      collapsable: false,
      children: [
        '',
      ]
    }
  ]
}

function getAboutSidebar() {
  return [
    {
      title: '关于我们',
      collapsable: false,
      children: [
        '',
        'changelog',
      ]
    }
  ]
}